{extend name="public:base" /}

{block name="breadcrumb"}
<ul class="breadcrumb">
    <li>
        <i class="ace-icon fa fa-home home-icon"></i>
        <a href="{:url('article/lists')}">文章管理</a>
    </li>
    <li class="active">添加文章</li>
</ul>
{/block}

{block name="content"}
<div class="page-header">
    <h1>
        您当前操作
        <small>
            <i class="ace-icon fa fa-angle-double-right"></i>
            添加文章
        </small>
    </h1>
</div>

<div class="row">
    <div class="col-xs-12">
        <form class="form-horizontal ajaxForm2" name="form" method="post" action="{:url('add')}" enctype="multipart/form-data">

            <div class="form-group">
                <label class="col-xs-12 col-md-1 control-label"> 文章分类： </label>
                <div class="col-xs-12 col-md-10">
                    <select name="news_columnid"  class="col-sm-3 selector" required>
                        <option value="">请选择所属栏目</option>
                        {foreach name="menu" item="vo"}
                            <option value="{$vo.id}" {if condition="$vo.menu_type eq 1"}disabled class="bgccc"{else/}class="bgc"{/if}>{$vo.lefthtml}{$vo.menu_name} {if condition="$vo.menu_type eq 1"}(频道页){/if}</option>
                        {/foreach}
                    </select>
                </div>
            </div>
            <div class="space-4"></div>

            <div class="form-group">
                <label class="col-xs-12 col-md-1 control-label"> 文章标题： </label>
                <div class="col-xs-12 col-md-10">
                    <input type="text" name="title" value="" class="col-xs-12 col-md-5" placeholder="必填：文章标题">
                </div>
            </div>
            <div class="space-4"></div>

            <div class="form-group">
                <label class="col-xs-12 col-md-1 control-label"> 文章内容： </label>
                <div class="col-xs-12 col-md-10">
                    <script id="myEditor" type="text/plain" style="height:300px;width:100%;"></script>
                </div>
            </div>
            <div class="space-4"></div>

            <div class="form-group">
                <label class="col-xs-12 col-md-1 control-label"> 开启评论： </label>
                <div class="col-xs-12 col-md-10">
                    <label>
                        <input name="comment" class="ace ace-switch ace-switch-7" type="checkbox">
                        <span class="lbl"></span>
                    </label>
                </div>
            </div>
            <div class="space-4"></div>

            <div class="clearfix form-actions">
                <div class="col-md-offset-3 col-md-9">
                    <button class="btn btn-info" type="submit">
                        <i class="ace-icon fa fa-check bigger-110"></i>
                        保存
                    </button>

                    &nbsp; &nbsp; &nbsp;
                    <button class="btn" type="reset">
                        <i class="ace-icon fa fa-undo bigger-110"></i>
                        重置
                    </button>
                </div>
            </div>
        </form>
    </div>
</div>
{/block}

{block name="js"}
<script src="__EDITOR__/ueditor/ueditor.config.js" type="text/javascript"></script>
<script src="__EDITOR__/ueditor/ueditor.all.js" type="text/javascript"></script>
<script type="text/javascript">
    var editor = UE.getEditor('myEditor');
</script>
{/block}